
<%@page import="member.Login"%>
<%@page import="member.MemberVo"%>
<%@page import="java.util.Vector"%>
<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">

<title>Member List</title>
<meta name='viewport' content='width=device-width, initial-scale=1'>
<link rel="stylesheet" href="http://code.jquery.com/mobile/1.3.2/jquery.mobile-1.3.2.min.css"/>
<script src="http://code.jquery.com/jquery-1.8.3.min.js"></script>
<script src="http://code.jquery.com/mobile/1.3.2/jquery.mobile-1.3.2.min.js"></script>
</head>
<body>
<jsp:useBean id="login" class="member.Login"/>
<jsp:setProperty property="*" name="login"/>
<% 
	String sessionID = (String)session.getAttribute("mid"); // 세션아이디를 가져오는 작업
%>
<%
Vector<MemberVo> vo = login.list();
%>

<div data-role='page' id="gridMain">

	<div data-role="header" data-position="fixed"><h1>Layout Grid</h1>
		<%if(sessionID == null || sessionID == ""){ %>
			<a href='Login.jsp' data role='button' data-rel='dialog' data-transition='flip' data-theme='d' class='ui-btn-right' data-icon='myproject'>로그인</a>
		<%}else{%>
			<a href='#' data-theme='d'><%=sessionID%>님</a>
			<a href='Logout.jsp' data role='button' data-rel='dialog' data-theme='d' class='ui-btn-right'>로그아웃</a>
		<%} %>
	</div>
	<form metho="post" action="jqm_member_list.jsp">
		<input type="search" name="memberid" autocomplete='off' value='<%=login.getMemberid()%>'>
		<input type="submit" value="검색" data-inline="true">
	</form>
	
	
	<div data-role="content">
		<h3>회원 목록</h3>
		<%if(sessionID == null || sessionID == ""){ %>
			<h1>반갑습니다.</h1>
		<%}else{%>
			
			<div class="ui-grid-c ui-bar-c">
				<!-- 목록자리 -->
				<div class="ui-block-a div_first ui-bar-a">순번</div>
				<div class="ui-block-b div_first ui-bar-a">아이디</div>
				<div class="ui-block-c div_first ui-bar-a">성명</div>
				<div class="ui-block-d div_first ui-bar-a">연락처</div>
			<%for(int i=0; i< vo.size() ;i++) {
				MemberVo m = vo.get(i);
				
			%>
				<div class="ui-block-a div_first ui-bar-d"><%=(i+1) %></div>
				<div class="ui-block-b div_first ui-bar-d"><%=m.getMemberid() %></div>
				<div class="ui-block-c div_first ui-bar-d"><%=m.getIrum() %></div>
				<div class="ui-block-d div_first ui-bar-d"><%=m.getPhone() %></div>
				<%} %>
			</div>
			
		<%} %>
	</div>
	
	
	<div data-role="footer" data-position="fixed"><h1>Footer</h1></div>

</div>


</body>
</html>